package com.joeyzh.base.filter;

import com.joey.ui.general.BaseNoBarFragment;

/**
 * Created by Joey on 2019/1/10.
 *
 * @author by Joey
 *         基础筛选基类
 */

public abstract class BaseFilterFragment<Presenter extends BaseFilterPresenter> extends BaseNoBarFragment {

    Presenter presenter;
    FilterResultInterface resultInterface;

    @Override
    public void initData() {
        super.initData();
        createPresenter();
        presenter.setResultInterface(resultInterface);
    }

    /**
     * 创建
     *
     * @return
     */
    public abstract Presenter createPresenter();

    public void setResultInterface(FilterResultInterface resultInterface) {
        this.resultInterface = resultInterface;
        presenter.setResultInterface(resultInterface);
    }
}
